package com.bawei.common.leakCanary

import android.content.Context
import java.lang.ref.WeakReference

/**
 * 20250214 游戏鸿蒙-i视频-09-性能升级-内存泄漏 静态变量引用的内存泄露
 */
class LeakCanary {
    companion object{
        private var instance: WeakReference<Context>?=null

        fun getInstance():Context?{
            return instance?.get()
        }

        fun setInstance(activity: Context){
            instance= WeakReference(activity)
        }

    }
}